home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 014a / magic122.zip / API.DOC next >
Text File  |  1991-07-12  |  4KB  |  158 lines

  1.  
  2. **************************************************************
  3.     INTERRUPT 49H INTERFACE FOR MAGIC
  4. **************************************************************
  5.  
  6. This interface allows external programs to control MAGIC TSR.
  7. The default interrupt number is changable via command line switch 
  8. /Inn, e.g. /I64 would set interrupt 64 hex.
  9.  
  10. In order for caller to identify whether MAGIC holds the interrupt 49h,
  11. @@--NEW-->@@
  12. there is a 6 byte ID stored immediately preceeding the interrupt service. 
  13. The ID is: " MAGic" (case as shown, quotes are not part of the string).
  14. For MAGic Deluxe the ID string is "xMAGic". The ID string will not wrap 
  15. around the segment boundaries, thus the offset of the interrupt vector
  16. must be at least 6.
  17.  
  18. ID can be used to identify MAGIC and also to find which interrupt
  19. vector is used - application can examine 256 interrupt vectors
  20. and check 6 bytes preceeding the service routine. As an additional
  21. check, in the same segment at offset 0 there will be standard
  22. CodeRunneR ID: RT followed by 4 byte TSR ID: VMAG (for VGA MAGIC).
  23.  
  24.  
  25.  
  26.     INT 49h OPERATIONAL CONVENTIONS
  27.  
  28.  1. Caller's registers AX,BX,CX,DX are modified.
  29.     Registers DS,ES,SI,DI,BP,SS,SP and Flags are preserved.
  30.  
  31.  2. Function number (1,2,..) is passed in AX register.  Any other 
  32.     arguments are passed in BX,CX,DX.
  33.  
  34.  4. Operation status is returned in AX. Any other return values
  35.     are passed in BX,CX,DX.
  36.  
  37.  5. The following return status values (AX) are common to all
  38.     functions:
  39.  
  40.     -1    TSR was busy, try same call later
  41.     -2    Invalid function number
  42.     -3    Function works only in magnified mode
  43.     -4  Function works only in unmagnified mode
  44.     -5  Function works only for MAGic Deluxe
  45.  
  46.  
  47.  6. Horizontal (X) and vertical (Y) coordinates or sizes are passed
  48.     (or returned) in registers DX for X and BX for Y.
  49.  
  50.  7. The coordinates/sizes are measured in the same units as
  51.     those used by VGA hardware:
  52.  
  53.     a) In graphics modes
  54.  
  55.     X: 8 pixel units
  56.     Y: 1 pixel units
  57.  
  58.     b) Text modes
  59.  
  60.     X: character columns
  61.     Y: character lines
  62.  
  63.     All coordinates are 0 based, sizes are 1 based.
  64.  
  65.     
  66.  8. Interrupts are enabled during command execution and any other
  67.     MAGIC operations are locked out.
  68.  
  69.  
  70. *************************************************************************
  71.         FUNCTIONS
  72. *************************************************************************
  73.  
  74.  
  75. --01-- Magnify ON
  76.  
  77. ENTRY:    AX = 1
  78. EXIT:   AX = 0    Cannot magnify in current video state
  79.        = 2    Magnified in text mode
  80.        = 3    Magnified in graphics mode
  81.  
  82. --02-- Magnify OFF
  83.  
  84. ENTRY:    AX = 2
  85. EXIT:    AX = *    Same as function 1
  86.  
  87.  
  88. --03-- Capture screen point (e.g. mouse cursor)
  89.  
  90. ENTRY:    AX = 3
  91.     DX = X
  92.     BX = Y
  93.  
  94. EXIT:    AX = 0    Ok
  95.  
  96.     Specified X,Y point is made part of magnified window. No window
  97.     movement is done is the point is already within the window.
  98.  
  99.  
  100. --04-- Reposition magnified window
  101.  
  102. ENTRY:    AX = 4
  103.     DX = X of upper left corner
  104.     BX = Y of upper left corner
  105.  
  106. EXIT:    AX = 0    Ok
  107.  
  108.     Sets upper left corner of the magnified window to requested
  109.     coordinates. If the coordinates are outside of valid screen
  110.     boundaries, the nearest position is set.
  111.  
  112.  
  113. --05--  Get position of magnified window
  114.  
  115. ENTRY:    AX = 5
  116. EXIT:    AX = 0    Position in DX,BX is valid only if AX is 0.
  117.     DX = X
  118.     BX = Y
  119.  
  120.  
  121. --06--  Get full screen size (valid only in magnified mode)
  122.  
  123. ENTRY:    AX = 6
  124. EXIT:    AX = 0    Sizes in DX,BX is valid only if AX is 0.
  125.     DX = Horizontal size
  126.     BX = Vertical size
  127.  
  128.  
  129. --07--  Get magnified window size
  130.  
  131. ENTRY:    AX = 7
  132. EXIT:    AX = 0    Sizes in BX,DX is valid only if AX is 0.
  133.     DX = Horizontal size
  134.     BX = Vertical size
  135.  
  136.     The sizes returned are always smaller or equal than those
  137.     of full screen (equal only in modes where no magnification
  138.     is possible).
  139.  
  140. --08--  Set text mode magnification size
  141.  
  142. ENTRY:    AX = 8
  143.     BX = Scaling factor 1,2,4,6,8,9
  144.          Values 4,6,8,9 are available only for MAGic Deluxe
  145.  
  146. EXIT:    AX =  0  Ok
  147.        = -4  MAGic is in magnified state, can't set size
  148.        = -5  Requested size works only for MAGic Deluxe
  149.  
  150.     This function may be called only in unmagnified state to set
  151.     the size for subsequent magnify-on call (func AX=1).
  152.     
  153.     Regular MAGic supports only BX=1 and 2 (magnifications 1.4 and
  154.     2 times). MAGic Deluxe supports additional values BX=4,6,8,9
  155.     (magnifications 4,6,8,12 times).
  156.  
  157.  
  158.